jQuery(document).ready(function($){ var error=true; function addLoading(e){ } function removeLoading(e){ } function addError(name, e, effect){ error=true; $(e).removeClass('icon success'); $(e).addClass('icon error'); $('.contact-form .contact-form-error-messages .contact-form-error-' + name).css('display','block'); if(effect!==undefined&&effect==true){ $(e).css({position:'relative'}).animate({left:-10}, 100).animate({left:10}, 100).animate({left:-5}, 100).animate({left:5}, 100).animate({left:0}, 100); }} function addSuccess(e){ $(e).addClass('icon success'); } function removeError(name, e){ error=false; $('.contact-form .contact-form-error-messages .contact-form-error-' + name).css('display','none'); $(e).removeClass('icon error'); $(e).removeClass('formRed') addSuccess(e); } $('.contact-form .required').blur(function(){ var name=$(this).attr('name').match(/(.*)\[(.*)\]/); if($(this).val()=='') addError(name[2], this); else removeError(name[2], this); }); $('.contact-form .email-validate').blur(function(){ var expr=/^[_a-z0-9+-]+(\.[_a-z0-9+-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)+$/; var name=$(this).attr('name').match(/(.*)\[(.*)\]/); if(( $(this).val()!=''&&!expr.test($(this).val()))||($(this).is('.required')&&$(this).val()=='')) addError(name[2], this); else removeError(name[2], this); }); $('.contact-form').submit(function(){ addLoading('.contact-form input:submit'); }); if($.fn.placeholder){ $('input[placeholder], textarea[placeholder]').placeholder(); } function orderFields(){ $('#content-page .contact-form').each(function(){ var contactForm=$('ul', $(this)); var submit=contactForm.find('.submit-button'); var textarea=contactForm.find('li').filter('.textarea-field.span9'); if($('body').outerWidth() <=767){ textarea.appendTo(contactForm); submit.appendTo(contactForm); }}); } $(window).resize(function(){ orderFields(); }); orderFields(); }); (function ($){ const creditCardFormType=$('#woocommerce_omise_secure_form_enabled'); const cardFormTheme=$('#woocommerce_omise_card_form_theme'); const cardFormThemeParent=cardFormTheme.closest("tr[valign='top']"); Boolean(parseInt(creditCardFormType.val())) ? cardFormThemeParent.show() : cardFormThemeParent.hide(); creditCardFormType.on('change', function(e){ Boolean(parseInt($(this).val())) ? cardFormThemeParent.show() : cardFormThemeParent.hide(); }); })(jQuery); if(typeof tb_pathToImage!='string'){ var tb_pathToImage=thickboxL10n.loadingAnimation; } jQuery(document).ready(function(){ tb_init('a.thickbox, area.thickbox, input.thickbox'); imgLoader=new Image(); imgLoader.src=tb_pathToImage; }); function tb_init(domChunk){ jQuery('body') .on('click', domChunk, tb_click) .on('thickbox:iframe:loaded', function(){ jQuery('#TB_window').removeClass('thickbox-loading'); }); } function tb_click(){ var t=this.title||this.name||null; var a=this.href||this.alt; var g=this.rel||false; tb_show(t,a,g); this.blur(); return false; } function tb_show(caption, url, imageGroup){ var $closeBtn; try { if(typeof document.body.style.maxHeight==="undefined"){ jQuery("body","html").css({height: "100%", width: "100%"}); jQuery("html").css("overflow","hidden"); if(document.getElementById("TB_HideSelect")===null){ jQuery("body").append("
"); jQuery("#TB_overlay").click(tb_remove); }}else{ if(document.getElementById("TB_overlay")===null){ jQuery("body").append("
"); jQuery("#TB_overlay").click(tb_remove); jQuery('body').addClass('modal-open'); }} if(tb_detectMacXFF()){ jQuery("#TB_overlay").addClass("TB_overlayMacFFBGHack"); }else{ jQuery("#TB_overlay").addClass("TB_overlayBG"); } if(caption===null){caption="";} jQuery("body").append("
"); jQuery('#TB_load').show(); var baseURL; if(url.indexOf("?")!==-1){ baseURL=url.substr(0, url.indexOf("?")); }else{ baseURL=url; } var urlString=/\.jpg$|\.jpeg$|\.png$|\.gif$|\.bmp$/; var urlType=baseURL.toLowerCase().match(urlString); if(urlType=='.jpg'||urlType=='.jpeg'||urlType=='.png'||urlType=='.gif'||urlType=='.bmp'){ TB_PrevCaption=""; TB_PrevURL=""; TB_PrevHTML=""; TB_NextCaption=""; TB_NextURL=""; TB_NextHTML=""; TB_imageCount=""; TB_FoundURL=false; if(imageGroup){ TB_TempArray=jQuery("a[rel="+imageGroup+"]").get(); for (TB_Counter=0; ((TB_Counter < TB_TempArray.length)&&(TB_NextHTML==="")); TB_Counter++){ var urlTypeTemp=TB_TempArray[TB_Counter].href.toLowerCase().match(urlString); if(!(TB_TempArray[TB_Counter].href==url)){ if(TB_FoundURL){ TB_NextCaption=TB_TempArray[TB_Counter].title; TB_NextURL=TB_TempArray[TB_Counter].href; TB_NextHTML="  "+thickboxL10n.next+""; }else{ TB_PrevCaption=TB_TempArray[TB_Counter].title; TB_PrevURL=TB_TempArray[TB_Counter].href; TB_PrevHTML="  "+thickboxL10n.prev+""; }}else{ TB_FoundURL=true; TB_imageCount=thickboxL10n.image + ' ' + (TB_Counter + 1) + ' ' + thickboxL10n.of + ' ' + (TB_TempArray.length); }} } imgPreloader=new Image(); imgPreloader.onload=function(){ imgPreloader.onload=null; var pagesize=tb_getPageSize(); var x=pagesize[0] - 150; var y=pagesize[1] - 150; var imageWidth=imgPreloader.width; var imageHeight=imgPreloader.height; if(imageWidth > x){ imageHeight=imageHeight * (x / imageWidth); imageWidth=x; if(imageHeight > y){ imageWidth=imageWidth * (y / imageHeight); imageHeight=y; }}else if(imageHeight > y){ imageWidth=imageWidth * (y / imageHeight); imageHeight=y; if(imageWidth > x){ imageHeight=imageHeight * (x / imageWidth); imageWidth=x; }} TB_WIDTH=imageWidth + 30; TB_HEIGHT=imageHeight + 60; jQuery("#TB_window").append(""+thickboxL10n.close+""+caption+"" + "
"+caption+"
" + TB_imageCount + TB_PrevHTML + TB_NextHTML + "
"); jQuery("#TB_closeWindowButton").click(tb_remove); if(!(TB_PrevHTML==="")){ function goPrev(){ if(jQuery(document).unbind("click",goPrev)){jQuery(document).unbind("click",goPrev);} jQuery("#TB_window").remove(); jQuery("body").append("
"); tb_show(TB_PrevCaption, TB_PrevURL, imageGroup); return false; } jQuery("#TB_prev").click(goPrev); } if(!(TB_NextHTML==="")){ function goNext(){ jQuery("#TB_window").remove(); jQuery("body").append("
"); tb_show(TB_NextCaption, TB_NextURL, imageGroup); return false; } jQuery("#TB_next").click(goNext); } jQuery(document).bind('keydown.thickbox', function(e){ if(e.which==27){ tb_remove(); }else if(e.which==190){ if(!(TB_NextHTML=="")){ jQuery(document).unbind('thickbox'); goNext(); }}else if(e.which==188){ if(!(TB_PrevHTML=="")){ jQuery(document).unbind('thickbox'); goPrev(); }} return false; }); tb_position(); jQuery("#TB_load").remove(); jQuery("#TB_ImageOff").click(tb_remove); jQuery("#TB_window").css({'visibility':'visible'}); }; imgPreloader.src=url; }else{ var queryString=url.replace(/^[^\?]+\??/,''); var params=tb_parseQuery(queryString); TB_WIDTH=(params['width']*1) + 30||630; TB_HEIGHT=(params['height']*1) + 40||440; ajaxContentW=TB_WIDTH - 30; ajaxContentH=TB_HEIGHT - 45; if(url.indexOf('TB_iframe')!=-1){ urlNoQuery=url.split('TB_'); jQuery("#TB_iframeContent").remove(); if(params['modal']!="true"){ jQuery("#TB_window").append("
"+caption+"
"); }else{ jQuery("#TB_overlay").unbind(); jQuery("#TB_window").append(""); }}else{ if(jQuery("#TB_window").css("visibility")!="visible"){ if(params['modal']!="true"){ jQuery("#TB_window").append("
"+caption+"
"); }else{ jQuery("#TB_overlay").unbind(); jQuery("#TB_window").append("
"); }}else{ jQuery("#TB_ajaxContent")[0].style.width=ajaxContentW +"px"; jQuery("#TB_ajaxContent")[0].style.height=ajaxContentH +"px"; jQuery("#TB_ajaxContent")[0].scrollTop=0; jQuery("#TB_ajaxWindowTitle").html(caption); }} jQuery("#TB_closeWindowButton").click(tb_remove); if(url.indexOf('TB_inline')!=-1){ jQuery("#TB_ajaxContent").append(jQuery('#' + params['inlineId']).children()); jQuery("#TB_window").bind('tb_unload', function (){ jQuery('#' + params['inlineId']).append(jQuery("#TB_ajaxContent").children()); }); tb_position(); jQuery("#TB_load").remove(); jQuery("#TB_window").css({'visibility':'visible'}); }else if(url.indexOf('TB_iframe')!=-1){ tb_position(); jQuery("#TB_load").remove(); jQuery("#TB_window").css({'visibility':'visible'}); }else{ var load_url=url; load_url +=-1===url.indexOf('?') ? '?':'&'; jQuery("#TB_ajaxContent").load(load_url +="random=" + (new Date().getTime()),function(){ tb_position(); jQuery("#TB_load").remove(); tb_init("#TB_ajaxContent a.thickbox"); jQuery("#TB_window").css({'visibility':'visible'}); }); }} if(!params['modal']){ jQuery(document).bind('keydown.thickbox', function(e){ if(e.which==27){ tb_remove(); return false; }}); } $closeBtn=jQuery('#TB_closeWindowButton'); if($closeBtn.find('.tb-close-icon').is(':visible')){ $closeBtn.focus(); }} catch(e){ }} function tb_showIframe(){ jQuery("#TB_load").remove(); jQuery("#TB_window").css({'visibility':'visible'}).trigger('thickbox:iframe:loaded'); } function tb_remove(){ jQuery("#TB_imageOff").unbind("click"); jQuery("#TB_closeWindowButton").unbind("click"); jQuery('#TB_window').fadeOut('fast', function(){ jQuery('#TB_window, #TB_overlay, #TB_HideSelect').trigger('tb_unload').unbind().remove(); jQuery('body').trigger('thickbox:removed'); }); jQuery('body').removeClass('modal-open'); jQuery("#TB_load").remove(); if(typeof document.body.style.maxHeight=="undefined"){ jQuery("body","html").css({height: "auto", width: "auto"}); jQuery("html").css("overflow",""); } jQuery(document).unbind('.thickbox'); return false; } function tb_position(){ var isIE6=typeof document.body.style.maxHeight==="undefined"; jQuery("#TB_window").css({marginLeft: '-' + parseInt((TB_WIDTH / 2),10) + 'px', width: TB_WIDTH + 'px'}); if(! isIE6){ jQuery("#TB_window").css({marginTop: '-' + parseInt((TB_HEIGHT / 2),10) + 'px'}); }} function tb_parseQuery(query){ var Params={}; if(! query){return Params;} var Pairs=query.split(/[;&]/); for(var i=0; i < Pairs.length; i++){ var KeyVal=Pairs[i].split('='); if(! KeyVal||KeyVal.length!=2){continue;} var key=unescape(KeyVal[0]); var val=unescape(KeyVal[1]); val=val.replace(/\+/g, ' '); Params[key]=val; } return Params; } function tb_getPageSize(){ var de=document.documentElement; var w=window.innerWidth||self.innerWidth||(de&&de.clientWidth)||document.body.clientWidth; var h=window.innerHeight||self.innerHeight||(de&&de.clientHeight)||document.body.clientHeight; arrayPageSize=[w,h]; return arrayPageSize; } function tb_detectMacXFF(){ var userAgent=navigator.userAgent.toLowerCase(); if(userAgent.indexOf('mac')!=-1&&userAgent.indexOf('firefox')!=-1){ return true; }}; (function(b,r,F){function c(a,s,c){a=r.createElement(a);s&&(a.id=l+s);c&&(a.style.cssText=c);return b(a)}function R(a){var b=j.length;a=(q+a)%b;return 0>a?b+a:a}function n(a,b){return Math.round((/%/.test(a)?("x"===b?k.width():k.height())/100:1)*parseInt(a,10))}function ma(a){"contains"in h[0]&&!h[0].contains(a.target)&&(a.stopPropagation(),h.focus())}function na(){var u,c=b.data(p,y);null==c?(a=b.extend({},X),console&&console.log&&console.log("Error: cboxElement missing settings object")):a=b.extend({}, c);for(u in a)b.isFunction(a[u])&&"on"!==u.slice(0,2)&&(a[u]=a[u].call(p));a.rel=a.rel||p.rel||b(p).data("rel")||"nofollow";a.href=a.href||b(p).attr("href");a.title=a.title||p.title;"string"===typeof a.href&&(a.href=b.trim(a.href))}function G(a,c){b(r).trigger(a);H.trigger(a);b.isFunction(c)&&c.call(p)}function oa(u){if(!S){p=u;na();j=b(p);q=0;"nofollow"!==a.rel&&(j=b("."+K).filter(function(){var c=b.data(this,y),u;c&&(u=b(this).data("rel")||c.rel||this.rel);return u===a.rel}),q=j.index(p),-1===q&& (j=j.add(p),q=j.length-1));v.css({opacity:parseFloat(a.opacity),cursor:a.overlayClose?"pointer":"auto",visibility:"visible"}).show();if(!z){z=L=!0;h.css({visibility:"hidden",display:"block"});m=c(d,"LoadedContent","width:0; height:0; overflow:hidden").appendTo(w);A=Y.height()+Z.height()+w.outerHeight(!0)-w.height();B=$.width()+aa.width()+w.outerWidth(!0)-w.width();C=m.outerHeight(!0);D=m.outerWidth(!0);a.w=n(a.initialWidth,"x");a.h=n(a.initialHeight,"y");f.position();T&&k.bind("resize."+U+" scroll."+ U,function(){v.css({width:k.width(),height:k.height(),top:k.scrollTop(),left:k.scrollLeft()})}).trigger("resize."+U);var e,J=l+"Slideshow_",g="click."+l,t,x,ba,E;a.slideshow&&j[1]?(t=function(){clearTimeout(e)},x=function(){if(a.loop||j[q+1])e=setTimeout(f.next,a.slideshowSpeed)},ba=function(){M.html(a.slideshowStop).unbind(g).one(g,E);H.bind(ca,x).bind(da,t).bind(ea,E);h.removeClass(J+"off").addClass(J+"on")},E=function(){t();H.unbind(ca,x).unbind(da,t).unbind(ea,E);M.html(a.slideshowStart).unbind(g).one(g, function(){f.next();ba()});h.removeClass(J+"on").addClass(J+"off")},a.slideshowAuto?ba():E()):h.removeClass(J+"off "+J+"on");G(ra,a.onOpen);fa.add(ga).hide();ha.html(a.close).show();h.focus();r.addEventListener&&(r.addEventListener("focus",ma,!0),H.one(ia,function(){r.removeEventListener("focus",ma,!0)}));if(a.returnFocus)H.one(ia,function(){b(p).focus()})}f.load(!0)}}function pa(){!h&&r.body&&(ja=!1,k=b(F),h=c(d).attr({id:y,"class":N?l+(T?"IE6":"IE"):"",role:"dialog",tabindex:"-1"}).hide(),v=c(d, "Overlay",T?"position:absolute":"").hide(),V=c(d,"LoadingOverlay").add(c(d,"LoadingGraphic")),I=c(d,"Wrapper"),w=c(d,"Content").append(ga=c(d,"Title"),ka=c(d,"Current"),O=c("button","Previous"),P=c("button","Next"),M=c("button","Slideshow"),V,ha=c("button","Close")),I.append(c(d).append(c(d,"TopLeft"),Y=c(d,"TopCenter"),c(d,"TopRight")),c(d,!1,"clear:left").append($=c(d,"MiddleLeft"),w,aa=c(d,"MiddleRight")),c(d,!1,"clear:left").append(c(d,"BottomLeft"),Z=c(d,"BottomCenter"),c(d,"BottomRight"))).find("div div").css({"float":"left"}), Q=c(d,!1,"position:absolute; width:9999px; visibility:hidden; display:none"),fa=P.add(O).add(ka).add(M),b(r.body).append(v,h.append(I,Q)))}var X={transition:"elastic",speed:300,width:!1,initialWidth:"600",innerWidth:!1,maxWidth:!1,height:!1,initialHeight:"450",innerHeight:!1,maxHeight:!1,scalePhotos:!0,scrolling:!0,inline:!1,html:!1,iframe:!1,fastIframe:!0,photo:!1,href:!1,title:!1,rel:!1,opacity:0.9,preloading:!0,className:!1,retinaImage:!1,retinaUrl:!1,retinaSuffix:"@2x.$1",current:"image {current} of {total}", previous:"previous",next:"next",close:"close",xhrError:"This content failed to load.",imgError:"This image failed to load.",open:!1,returnFocus:!0,reposition:!0,loop:!0,slideshow:!1,slideshowAuto:!0,slideshowSpeed:2500,slideshowStart:"start slideshow",slideshowStop:"stop slideshow",photoRegex:/\.(gif|png|jp(e|g|eg)|bmp|ico)((#|\?).*)?$/i,onOpen:!1,onLoad:!1,onComplete:!1,onCleanup:!1,onClosed:!1,overlayClose:!0,escKey:!0,arrowKey:!0,top:!1,bottom:!1,left:!1,right:!1,fixed:!1,data:void 0},y="colorbox", l="cbox",K=l+"Element",ra=l+"_open",da=l+"_load",ca=l+"_complete",ea=l+"_cleanup",ia=l+"_closed",W=l+"_purge",N=!b.support.leadingWhitespace,T=N&&!F.XMLHttpRequest,U=l+"_IE6",v,h,I,w,Y,$,aa,Z,j,k,m,Q,V,ga,ka,M,P,O,ha,fa,H=b({}),a,A,B,C,D,p,q,e,z,L,S,qa,f,d="div",la,ja;b.colorbox||(b(pa),f=b.fn[y]=b[y]=function(c,e){var d=this;c=c||{};pa();var g;g=function(a){1"),c.open=!0;else if(!d[0])return d;e&&(c.onComplete=e);d.each(function(){b.data(this, y,b.extend({},b.data(this,y)||X,c))}).addClass(K);(b.isFunction(c.open)&&c.open.call(d)||c.open)&&oa(d[0])}return d},f.position=function(b,c){function e(a){Y[0].style.width=Z[0].style.width=w[0].style.width=parseInt(a.style.width,10)-B+"px";w[0].style.height=$[0].style.height=aa[0].style.height=parseInt(a.style.height,10)-A+"px"}var d,j=d=0,x=h.offset(),m,E;k.unbind("resize."+l);h.css({top:-9E4,left:-9E4});m=k.scrollTop();E=k.scrollLeft();a.fixed&&!T?(x.top-=m,x.left-=E,h.css({position:"fixed"})): (d=m,j=E,h.css({position:"absolute"}));j=!1!==a.right?j+Math.max(k.width()-a.w-D-B-n(a.right,"x"),0):!1!==a.left?j+n(a.left,"x"):j+Math.round(Math.max(k.width()-a.w-D-B,0)/2);d=!1!==a.bottom?d+Math.max(k.height()-a.h-C-A-n(a.bottom,"y"),0):!1!==a.top?d+n(a.top,"y"):d+Math.round(Math.max(k.height()-a.h-C-A,0)/2);h.css({top:x.top,left:x.left,visibility:"visible"});b=h.width()===a.w+D&&h.height()===a.h+C?0:b||0;I[0].style.width=I[0].style.height="9999px";d={width:a.w+D+B,height:a.h+C+A,top:d,left:j}; 0===b&&h.css(d);h.dequeue().animate(d,{duration:b,complete:function(){e(this);L=!1;I[0].style.width=a.w+D+B+"px";I[0].style.height=a.h+C+A+"px";a.reposition&&setTimeout(function(){k.bind("resize."+l,f.position)},1);c&&c()},step:function(){e(this)}})},f.resize=function(b){z&&(b=b||{},b.width&&(a.w=n(b.width,"x")-D-B),b.innerWidth&&(a.w=n(b.innerWidth,"x")),m.css({width:a.w}),b.height&&(a.h=n(b.height,"y")-C-A),b.innerHeight&&(a.h=n(b.innerHeight,"y")),!b.innerHeight&&!b.height&&(m.css({height:"auto"}), a.h=m.height()),m.css({height:a.h}),f.position("none"===a.transition?0:a.speed))},f.prep=function(k){function n(){a.w=a.w||m.width();a.w=a.mw&&a.mwa.mw&&(c=(e.width-a.mw)/e.width,r()),a.mh&&e.height>a.mh&&(c=(e.height-a.mh)/e.height,r()));a.h&&(e.style.marginTop=Math.max(a.mh-e.height,0)/2+"px");if(j[1]&&(a.loop||j[q+1]))e.style.cursor="pointer", e.onclick=function(){f.next()};N&&(e.style.msInterpolationMode="bicubic");setTimeout(function(){g(e)},1)}),setTimeout(function(){e.src=s},1)):s&&Q.load(s,a.data,function(e,f){g("error"===f?c(d,"Error").html(a.xhrError):b(this).contents())})},f.next=function(){if(!L&&j[1]&&(a.loop||j[q+1]))q=R(1),f.load()},f.prev=function(){if(!L&&j[1]&&(a.loop||q))q=R(-1),f.load()},f.close=function(){z&&!S&&(S=!0,z=!1,G(ea,a.onCleanup),k.unbind("."+l+" ."+U),v.fadeTo(200,0),h.stop().fadeTo(300,0,function(){h.add(v).css({opacity:1, cursor:"auto"}).hide();G(W);m.empty().remove();setTimeout(function(){S=!1;G(ia,a.onClosed)},1)}))},f.remove=function(){b([]).add(h).add(v).remove();h=null;b("."+K).removeData(y).removeClass(K);b(r).unbind("click."+l)},f.element=function(){return b(p)},f.settings=X)})(jQuery,document,window); jQuery.easing['jswing']=jQuery.easing['swing']; jQuery.extend(jQuery.easing, { def: 'easeOutQuad', swing: function (x, t, b, c, d){ return jQuery.easing[jQuery.easing.def](x, t, b, c, d); }, easeInQuad: function (x, t, b, c, d){ return c*(t/=d)*t + b; }, easeOutQuad: function (x, t, b, c, d){ return -c *(t/=d)*(t-2) + b; }, easeInOutQuad: function (x, t, b, c, d){ if((t/=d/2) < 1) return c/2*t*t + b; return -c/2 * ((--t)*(t-2) - 1) + b; }, easeInCubic: function (x, t, b, c, d){ return c*(t/=d)*t*t + b; }, easeOutCubic: function (x, t, b, c, d){ return c*((t=t/d-1)*t*t + 1) + b; }, easeInOutCubic: function (x, t, b, c, d){ if((t/=d/2) < 1) return c/2*t*t*t + b; return c/2*((t-=2)*t*t + 2) + b; }, easeInQuart: function (x, t, b, c, d){ return c*(t/=d)*t*t*t + b; }, easeOutQuart: function (x, t, b, c, d){ return -c * ((t=t/d-1)*t*t*t - 1) + b; }, easeInOutQuart: function (x, t, b, c, d){ if((t/=d/2) < 1) return c/2*t*t*t*t + b; return -c/2 * ((t-=2)*t*t*t - 2) + b; }, easeInQuint: function (x, t, b, c, d){ return c*(t/=d)*t*t*t*t + b; }, easeOutQuint: function (x, t, b, c, d){ return c*((t=t/d-1)*t*t*t*t + 1) + b; }, easeInOutQuint: function (x, t, b, c, d){ if((t/=d/2) < 1) return c/2*t*t*t*t*t + b; return c/2*((t-=2)*t*t*t*t + 2) + b; }, easeInSine: function (x, t, b, c, d){ return -c * Math.cos(t/d * (Math.PI/2)) + c + b; }, easeOutSine: function (x, t, b, c, d){ return c * Math.sin(t/d * (Math.PI/2)) + b; }, easeInOutSine: function (x, t, b, c, d){ return -c/2 * (Math.cos(Math.PI*t/d) - 1) + b; }, easeInExpo: function (x, t, b, c, d){ return (t==0) ? b:c * Math.pow(2, 10 * (t/d - 1)) + b; }, easeOutExpo: function (x, t, b, c, d){ return (t==d) ? b+c:c * (-Math.pow(2, -10 * t/d) + 1) + b; }, easeInOutExpo: function (x, t, b, c, d){ if(t==0) return b; if(t==d) return b+c; if((t/=d/2) < 1) return c/2 * Math.pow(2, 10 * (t - 1)) + b; return c/2 * (-Math.pow(2, -10 * --t) + 2) + b; }, easeInCirc: function (x, t, b, c, d){ return -c * (Math.sqrt(1 - (t/=d)*t) - 1) + b; }, easeOutCirc: function (x, t, b, c, d){ return c * Math.sqrt(1 - (t=t/d-1)*t) + b; }, easeInOutCirc: function (x, t, b, c, d){ if((t/=d/2) < 1) return -c/2 * (Math.sqrt(1 - t*t) - 1) + b; return c/2 * (Math.sqrt(1 - (t-=2)*t) + 1) + b; }, easeInElastic: function (x, t, b, c, d){ var s=1.70158;var p=0;var a=c; if(t==0) return b; if((t/=d)==1) return b+c; if(!p) p=d*.3; if(a < Math.abs(c)){ a=c; var s=p/4; } else var s=p/(2*Math.PI) * Math.asin (c/a); return -(a*Math.pow(2,10*(t-=1)) * Math.sin((t*d-s)*(2*Math.PI)/p)) + b; }, easeOutElastic: function (x, t, b, c, d){ var s=1.70158;var p=0;var a=c; if(t==0) return b; if((t/=d)==1) return b+c; if(!p) p=d*.3; if(a < Math.abs(c)){ a=c; var s=p/4; } else var s=p/(2*Math.PI) * Math.asin (c/a); return a*Math.pow(2,-10*t) * Math.sin((t*d-s)*(2*Math.PI)/p) + c + b; }, easeInOutElastic: function (x, t, b, c, d){ var s=1.70158;var p=0;var a=c; if(t==0) return b; if((t/=d/2)==2) return b+c; if(!p) p=d*(.3*1.5); if(a < Math.abs(c)){ a=c; var s=p/4; } else var s=p/(2*Math.PI) * Math.asin (c/a); if(t < 1) return -.5*(a*Math.pow(2,10*(t-=1)) * Math.sin((t*d-s)*(2*Math.PI)/p)) + b; return a*Math.pow(2,-10*(t-=1)) * Math.sin((t*d-s)*(2*Math.PI)/p)*.5 + c + b; }, easeInBack: function (x, t, b, c, d, s){ if(s==undefined) s=1.70158; return c*(t/=d)*t*((s+1)*t - s) + b; }, easeOutBack: function (x, t, b, c, d, s){ if(s==undefined) s=1.70158; return c*((t=t/d-1)*t*((s+1)*t + s) + 1) + b; }, easeInOutBack: function (x, t, b, c, d, s){ if(s==undefined) s=1.70158; if((t/=d/2) < 1) return c/2*(t*t*(((s*=(1.525))+1)*t - s)) + b; return c/2*((t-=2)*t*(((s*=(1.525))+1)*t + s) + 2) + b; }, easeInBounce: function (x, t, b, c, d){ return c - jQuery.easing.easeOutBounce (x, d-t, 0, c, d) + b; }, easeOutBounce: function (x, t, b, c, d){ if((t/=d) < (1/2.75)){ return c*(7.5625*t*t) + b; }else if(t < (2/2.75)){ return c*(7.5625*(t-=(1.5/2.75))*t + .75) + b; }else if(t < (2.5/2.75)){ return c*(7.5625*(t-=(2.25/2.75))*t + .9375) + b; }else{ return c*(7.5625*(t-=(2.625/2.75))*t + .984375) + b; }}, easeInOutBounce: function (x, t, b, c, d){ if(t < d/2) return jQuery.easing.easeInBounce (x, t*2, 0, c, d) * .5 + b; return jQuery.easing.easeOutBounce (x, t*2-d, 0, c, d) * .5 + c*.5 + b; }}); ; (function(d){d.flexslider=function(i,k){var a=d(i),c=d.extend({},d.flexslider.defaults,k),e=c.namespace,r="ontouchstart"in window||window.DocumentTouch&&document instanceof DocumentTouch,s=r?"touchend":"click",l="vertical"===c.direction,m=c.reverse,h=0');if(1':""+b+"",a.controlNavScaffold.append("
  • "+g+"
  • "),b++;a.controlsContainer?d(a.controlsContainer).append(a.controlNavScaffold):a.append(a.controlNavScaffold);f.controlNav.set();f.controlNav.active();a.controlNavScaffold.delegate("a, img",s,function(b){b.preventDefault();var b=d(this),g=a.controlNav.index(b);b.hasClass(e+"active")||(a.direction=g>a.currentSlide?"next":"prev",a.flexAnimate(g,c.pauseOnAction))});r&&a.controlNavScaffold.delegate("a", "click touchstart",function(a){a.preventDefault()})},setupManual:function(){a.controlNav=a.manualControls;f.controlNav.active();a.controlNav.live(s,function(b){b.preventDefault();var b=d(this),g=a.controlNav.index(b);b.hasClass(e+"active")||(g>a.currentSlide?a.direction="next":a.direction="prev",a.flexAnimate(g,c.pauseOnAction))});r&&a.controlNav.live("click touchstart",function(a){a.preventDefault()})},set:function(){a.controlNav=d("."+e+"control-nav li "+("thumbnails"===c.controlNav?"img":"a"), a.controlsContainer?a.controlsContainer:a)},active:function(){a.controlNav.removeClass(e+"active").eq(a.animatingTo).addClass(e+"active")},update:function(b,c){1"+a.count+"")):1===a.pagingCount?a.controlNavScaffold.find("li").remove():a.controlNav.eq(c).closest("li").remove();f.controlNav.set();1
  • '+c.prevText+'
  • '+c.nextText+"
  • ");a.controlsContainer?(d(a.controlsContainer).append(b),a.directionNav=d("."+e+"direction-nav li a",a.controlsContainer)):(a.append(b),a.directionNav=d("."+e+"direction-nav li a",a));f.directionNav.update();a.directionNav.bind(s,function(b){b.preventDefault();b=d(this).hasClass(e+"next")?a.getTarget("next"):a.getTarget("prev");a.flexAnimate(b,c.pauseOnAction)}); r&&a.directionNav.bind("click touchstart",function(a){a.preventDefault()})},update:function(){var b=e+"disabled";1===a.pagingCount?a.directionNav.addClass(b):c.animationLoop?a.directionNav.removeClass(b):0===a.animatingTo?a.directionNav.removeClass(b).filter("."+e+"prev").addClass(b):a.animatingTo===a.last?a.directionNav.removeClass(b).filter("."+e+"next").addClass(b):a.directionNav.removeClass(b)}},pausePlay:{setup:function(){var b=d('
    ');a.controlsContainer? (a.controlsContainer.append(b),a.pausePlay=d("."+e+"pauseplay a",a.controlsContainer)):(a.append(b),a.pausePlay=d("."+e+"pauseplay a",a));f.pausePlay.update(c.slideshow?e+"pause":e+"play");a.pausePlay.bind(s,function(b){b.preventDefault();if(d(this).hasClass(e+"pause")){a.manualPause=true;a.manualPlay=false;a.pause()}else{a.manualPause=false;a.manualPlay=true;a.play()}});r&&a.pausePlay.bind("click touchstart",function(a){a.preventDefault()})},update:function(b){"play"===b?a.pausePlay.removeClass(e+ "pause").addClass(e+"play").text(c.playText):a.pausePlay.removeClass(e+"play").addClass(e+"pause").text(c.pauseText)}},touch:function(){function b(b){j=l?d-b.touches[0].pageY:d-b.touches[0].pageX;p=l?Math.abs(j)j||a.currentSlide===a.last&&0Number(new Date)-k&&50o/2)?a.flexAnimate(l,c.pauseOnAction):a.flexAnimate(a.currentSlide,c.pauseOnAction,!0)}i.removeEventListener("touchmove",b,!1);i.removeEventListener("touchend",g,!1);f=j=e=d=null}var d,e,f,o,j,k,p=!1;i.addEventListener("touchstart",function(j){a.animating?j.preventDefault():1===j.touches.length&&(a.pause(),o=l?a.h:a.w,k=Number(new Date),f=h&& m&&a.animatingTo===a.last?0:h&&m?a.limit-(a.itemW+c.itemMargin)*a.move*a.animatingTo:h&&a.currentSlide===a.last?a.limit:h?(a.itemW+c.itemMargin)*a.move*a.currentSlide:m?(a.last-a.currentSlide+a.cloneOffset)*o:(a.currentSlide+a.cloneOffset)*o,d=l?j.touches[0].pageY:j.touches[0].pageX,e=l?j.touches[0].pageX:j.touches[0].pageY,i.addEventListener("touchmove",b,!1),i.addEventListener("touchend",g,!1))},!1)},resize:function(){!a.animating&&a.is(":visible")&&(h||a.doMath(),q?f.smoothHeight():h?(a.slides.width(a.computedW), a.update(a.pagingCount),a.setProps()):l?(a.viewport.height(a.h),a.setProps(a.h,"setTotal")):(c.smoothHeight&&f.smoothHeight(),a.newSlides.width(a.computedW),a.setProps(a.computedW,"setTotal")))},smoothHeight:function(b){if(!l||q){var c=q?a:a.viewport;b?c.animate({height:a.slides.eq(a.animatingTo).height()},b):c.height(a.slides.eq(a.animatingTo).height())}},sync:function(b){var g=d(c.sync).data("flexslider"),e=a.animatingTo;switch(b){case "animate":g.flexAnimate(e,c.pauseOnAction,!1,!0);break;case "play":!g.playing&& !g.asNav&&g.play();break;case "pause":g.pause()}}};a.flexAnimate=function(b,g,n,i,k){p&&1===a.pagingCount&&(a.direction=a.currentItema.w?2*c.itemMargin:c.itemMargin,b=(a.itemW+b)*a.move*a.animatingTo,b=b>a.limit&&1!==a.visible?a.limit:b):b=0===a.currentSlide&&b===a.count-1&&c.animationLoop&&"next"!==a.direction?m?(a.count+a.cloneOffset)*o:0:a.currentSlide===a.last&&0===b&&c.animationLoop&&"prev"!==a.direction?m?0:(a.count+1)*o:m?(a.count-1-b+a.cloneOffset)*o:(b+a.cloneOffset)*o;a.setProps(b, "",c.animationSpeed);if(a.transitions){if(!c.animationLoop||!a.atEnd)a.animating=!1,a.currentSlide=a.animatingTo;a.container.unbind("webkitTransitionEnd transitionend");a.container.bind("webkitTransitionEnd transitionend",function(){a.wrapup(o)})}else a.container.animate(a.args,c.animationSpeed,c.easing,function(){a.wrapup(o)})}c.smoothHeight&&f.smoothHeight(c.animationSpeed)}};a.wrapup=function(b){!q&&!h&&(0===a.currentSlide&&a.animatingTo===a.last&&c.animationLoop?a.setProps(b,"jumpEnd"):a.currentSlide===a.last&&(0===a.animatingTo&&c.animationLoop)&&a.setProps(b,"jumpStart"));a.animating=!1;a.currentSlide=a.animatingTo;c.after(a)};a.animateSlides=function(){a.animating||a.flexAnimate(a.getTarget("next"))};a.pause=function(){clearInterval(a.animatedSlides);a.playing=!1;c.pausePlay&&f.pausePlay.update("play");a.syncExists&&f.sync("pause")};a.play=function(){a.animatedSlides=setInterval(a.animateSlides,c.slideshowSpeed);a.playing=!0;c.pausePlay&&f.pausePlay.update("pause");a.syncExists&&f.sync("play")}; a.canAdvance=function(b,g){var d=p?a.pagingCount-1:a.last;return g?!0:p&&a.currentItem===a.count-1&&0===b&&"prev"===a.direction?!0:p&&0===a.currentItem&&b===a.pagingCount-1&&"next"!==a.direction?!1:b===a.currentSlide&&!p?!1:c.animationLoop?!0:a.atEnd&&0===a.currentSlide&&b===d&&"next"!==a.direction?!1:a.atEnd&&a.currentSlide===d&&0===b&&"next"===a.direction?!1:!0};a.getTarget=function(b){a.direction=b;return"next"===b?a.currentSlide===a.last?0:a.currentSlide+1:0===a.currentSlide?a.last:a.currentSlide- 1};a.setProps=function(b,g,d){var e,f=b?b:(a.itemW+c.itemMargin)*a.move*a.animatingTo;e=-1*function(){if(h)return"setTouch"===g?b:m&&a.animatingTo===a.last?0:m?a.limit-(a.itemW+c.itemMargin)*a.move*a.animatingTo:a.animatingTo===a.last?a.limit:f;switch(g){case "setTotal":return m?(a.count-1-a.currentSlide+a.cloneOffset)*b:(a.currentSlide+a.cloneOffset)*b;case "setTouch":return b;case "jumpEnd":return m?b:a.count*b;case "jumpStart":return m?a.count*b:b;default:return b}}()+"px";a.transitions&&(e=l? "translate3d(0,"+e+",0)":"translate3d("+e+",0,0)",d=void 0!==d?d/1E3+"s":"0s",a.container.css("-"+a.pfx+"-transition-duration",d));a.args[a.prop]=e;(a.transitions||void 0===d)&&a.container.css(a.args)};a.setup=function(b){if(q)a.slides.css({width:"100%","float":"left",marginRight:"-100%",position:"relative"}),"init"===b&&a.slides.eq(a.currentSlide).fadeIn(c.animationSpeed,c.easing),c.smoothHeight&&f.smoothHeight();else{var g,n;"init"===b&&(a.viewport=d('
    ').css({overflow:"hidden", position:"relative"}).appendTo(a).append(a.container),a.cloneCount=0,a.cloneOffset=0,m&&(n=d.makeArray(a.slides).reverse(),a.slides=d(n),a.container.empty().append(a.slides)));c.animationLoop&&!h&&(a.cloneCount=2,a.cloneOffset=1,"init"!==b&&a.container.find(".clone").remove(),a.container.append(a.slides.first().clone().addClass("clone")).prepend(a.slides.last().clone().addClass("clone")));a.newSlides=d(c.selector,a);g=m?a.count-1-a.currentSlide+a.cloneOffset:a.currentSlide+a.cloneOffset;l&&!h?(a.container.height(200* (a.count+a.cloneCount)+"%").css("position","absolute").width("100%"),setTimeout(function(){a.newSlides.css({display:"block"});a.doMath();a.viewport.height(a.h);a.setProps(g*a.h,"init")},"init"===b?100:0)):(a.container.width(200*(a.count+a.cloneCount)+"%"),a.setProps(g*a.computedW,"init"),setTimeout(function(){a.doMath();a.newSlides.css({width:a.computedW,"float":"left",display:"block"});c.smoothHeight&&f.smoothHeight()},"init"===b?100:0))}h||a.slides.removeClass(e+"active-slide").eq(a.currentSlide).addClass(e+ "active-slide")};a.doMath=function(){var b=a.slides.first(),d=c.itemMargin,e=c.minItems,f=c.maxItems;a.w=a.width();a.h=b.height();a.boxPadding=b.outerWidth()-b.width();h?(a.itemT=c.itemWidth+d,a.minW=e?e*a.itemT:a.w,a.maxW=f?f*a.itemT:a.w,a.itemW=a.minW>a.w?(a.w-d*e)/e:a.maxWa.w?a.w:c.itemWidth,a.visible=Math.floor(a.w/(a.itemW+d)),a.move=0a.w?(a.itemW+2*d)*a.count-a.w-d:(a.itemW+d)*a.count-a.w-d):(a.itemW=a.w,a.pagingCount=a.count,a.last=a.count-1);a.computedW=a.itemW-a.boxPadding};a.update=function(b,d){a.doMath();h||(ba.controlNav.length)f.controlNav.update("add");else if("remove"===d&&!h||a.pagingCount a.last&&(a.currentSlide-=1,a.animatingTo-=1),f.controlNav.update("remove",a.last);c.directionNav&&f.directionNav.update()};a.addSlide=function(b,e){var f=d(b);a.count+=1;a.last=a.count-1;l&&m?void 0!==e?a.slides.eq(a.count-e).after(f):a.container.prepend(f):void 0!==e?a.slides.eq(e).before(f):a.container.append(f);a.update(e,"add");a.slides=d(c.selector+":not(.clone)",a);a.setup();c.added(a)};a.removeSlide=function(b){var e=isNaN(b)?a.slides.index(d(b)):b;a.count-=1;a.last=a.count-1;isNaN(b)?d(b, a.slides).remove():l&&m?a.slides.eq(a.last).remove():a.slides.eq(b).remove();a.doMath();a.update(e,"remove");a.slides=d(c.selector+":not(.clone)",a);a.setup();c.removed(a)};f.init()};d.flexslider.defaults={namespace:"flex-",selector:".slides > li",animation:"fade",easing:"swing",direction:"horizontal",reverse:!1,animationLoop:!0,smoothHeight:!1,startAt:0,slideshow:!0,slideshowSpeed:7E3,animationSpeed:600,initDelay:0,randomize:!1,pauseOnAction:!0,pauseOnHover:!1,useCSS:!0,touch:!0,video:!1,controlNav:!0, directionNav:!0,prevText:"Previous",nextText:"Next",keyboard:!0,multipleKeyboard:!1,mousewheel:!1,pausePlay:!1,pauseText:"Pause",playText:"Play",controlsContainer:"",manualControls:"",sync:"",asNavFor:"",itemWidth:0,itemMargin:0,minItems:0,maxItems:0,move:0,start:function(){},before:function(){},after:function(){},end:function(){},added:function(){},removed:function(){}};d.fn.flexslider=function(i){void 0===i&&(i={});if("object"===typeof i)return this.each(function(){var a=d(this),c=a.find(i.selector? i.selector:".slides > li");1===c.length?(c.fadeIn(400),i.start&&i.start(a)):void 0===a.data("flexslider")&&new d.flexslider(this,i)});var k=d(this).data("flexslider");switch(i){case "play":k.play();break;case "pause":k.pause();break;case "next":k.flexAnimate(k.getTarget("next"),!0);break;case "prev":case "previous":k.flexAnimate(k.getTarget("prev"),!0);break;default:"number"===typeof i&&k.flexAnimate(i,!0)}}})(jQuery); (function(c,n){var l="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///ywAAAAAAQABAAACAUwAOw==";c.fn.imagesLoaded=function(f){function m(){var b=c(i),a=c(h);d&&(h.length?d.reject(e,b,a):d.resolve(e));c.isFunction(f)&&f.call(g,e,b,a)}function j(b,a){b.src===l||-1!==c.inArray(b,k)||(k.push(b),a?h.push(b):i.push(b),c.data(b,"imagesLoaded",{isBroken:a,src:b.src}),o&&d.notifyWith(c(b),[a,e,c(i),c(h)]),e.length===k.length&&(setTimeout(m),e.unbind(".imagesLoaded")))}var g=this,d=c.isFunction(c.Deferred)?c.Deferred(): 0,o=c.isFunction(d.notify),e=g.find("img").add(g.filter("img")),k=[],i=[],h=[];c.isPlainObject(f)&&c.each(f,function(b,a){if("callback"===b)f=a;else if(d)d[b](a)});e.length?e.bind("load.imagesLoaded error.imagesLoaded",function(b){j(b.target,"error"===b.type)}).each(function(b,a){var d=a.src,e=c.data(a,"imagesLoaded");if(e&&e.src===d)j(a,e.isBroken);else if(a.complete&&a.naturalWidth!==n)j(a,0===a.naturalWidth||0===a.naturalHeight);else if(a.readyState||a.complete)a.src=l,a.src=d}):m();return d?d.promise(g): g}})(jQuery); (function($){$.fn.tipTip=function(options){var defaults={activation:"hover",keepAlive:false,maxWidth:"200px",edgeOffset:3,defaultPosition:"bottom",delay:400,fadeIn:200,fadeOut:200,attribute:"title",content:false,enter:function(){},exit:function(){}};var opts=$.extend(defaults,options);if($("#tiptip_holder").length<=0){var tiptip_holder=$('
    ');var tiptip_content=$('
    ');var tiptip_arrow=$('
    ');$("body").append(tiptip_holder.html(tiptip_content).prepend(tiptip_arrow.html('
    ')))}else{var tiptip_holder=$("#tiptip_holder");var tiptip_content=$("#tiptip_content");var tiptip_arrow=$("#tiptip_arrow")}return this.each(function(){var org_elem=$(this);if(opts.content){var org_title=opts.content}else{var org_title=org_elem.attr(opts.attribute)}if(org_title!=""){if(!opts.content){org_elem.removeAttr(opts.attribute)}var timeout=false;if(opts.activation=="hover"){org_elem.hover(function(){active_tiptip()},function(){if(!opts.keepAlive){deactive_tiptip()}});if(opts.keepAlive){tiptip_holder.hover(function(){},function(){deactive_tiptip()})}}else if(opts.activation=="focus"){org_elem.focus(function(){active_tiptip()}).blur(function(){deactive_tiptip()})}else if(opts.activation=="click"){org_elem.click(function(){active_tiptip();return false}).hover(function(){},function(){if(!opts.keepAlive){deactive_tiptip()}});if(opts.keepAlive){tiptip_holder.hover(function(){},function(){deactive_tiptip()})}}function active_tiptip(){opts.enter.call(this);tiptip_content.html(org_title);tiptip_holder.hide().removeAttr("class").css("margin","0");tiptip_arrow.removeAttr("style");var top=parseInt(org_elem.offset()['top']);var left=parseInt(org_elem.offset()['left']);var org_width=parseInt(org_elem.outerWidth());var org_height=parseInt(org_elem.outerHeight());var tip_w=tiptip_holder.outerWidth();var tip_h=tiptip_holder.outerHeight();var w_compare=Math.round((org_width-tip_w)/2);var h_compare=Math.round((org_height-tip_h)/2);var marg_left=Math.round(left+w_compare);var marg_top=Math.round(top+org_height+opts.edgeOffset);var t_class="";var arrow_top="";var arrow_left=Math.round(tip_w-12)/2;if(opts.defaultPosition=="bottom"){t_class="_bottom"}else if(opts.defaultPosition=="top"){t_class="_top"}else if(opts.defaultPosition=="left"){t_class="_left"}else if(opts.defaultPosition=="right"){t_class="_right"}var right_compare=(w_compare+left)parseInt($(window).width());if((right_compare&&w_compare<0)||(t_class=="_right"&&!left_compare)||(t_class=="_left"&&left<(tip_w+opts.edgeOffset+5))){t_class="_right";arrow_top=Math.round(tip_h-13)/2;arrow_left=-12;marg_left=Math.round(left+org_width+opts.edgeOffset);marg_top=Math.round(top+h_compare)}else if((left_compare&&w_compare<0)||(t_class=="_left"&&!right_compare)){t_class="_left";arrow_top=Math.round(tip_h-13)/2;arrow_left=Math.round(tip_w);marg_left=Math.round(left-(tip_w+opts.edgeOffset+5));marg_top=Math.round(top+h_compare)}var top_compare=(top+org_height+opts.edgeOffset+tip_h+8)>parseInt($(window).height()+$(window).scrollTop());var bottom_compare=((top+org_height)-(opts.edgeOffset+tip_h+8))<0;if(top_compare||(t_class=="_bottom"&&top_compare)||(t_class=="_top"&&!bottom_compare)){if(t_class=="_top"||t_class=="_bottom"){t_class="_top"}else{t_class=t_class+"_top"}arrow_top=tip_h;marg_top=Math.round(top-(tip_h+5+opts.edgeOffset))}else if(bottom_compare|(t_class=="_top"&&bottom_compare)||(t_class=="_bottom"&&!top_compare)){if(t_class=="_top"||t_class=="_bottom"){t_class="_bottom"}else{t_class=t_class+"_bottom"}arrow_top=-12;marg_top=Math.round(top+org_height+opts.edgeOffset)}if(t_class=="_right_top"||t_class=="_left_top"){marg_top=marg_top+5}else if(t_class=="_right_bottom"||t_class=="_left_bottom"){marg_top=marg_top-5}if(t_class=="_left_top"||t_class=="_left_bottom"){marg_left=marg_left+5}tiptip_arrow.css({"margin-left":arrow_left+"px","margin-top":arrow_top+"px"});tiptip_holder.css({"margin-left":marg_left+"px","margin-top":marg_top+"px"}).attr("class","tip"+t_class);if(timeout){clearTimeout(timeout)}timeout=setTimeout(function(){tiptip_holder.stop(true,true).fadeIn(opts.fadeIn)},opts.delay)}function deactive_tiptip(){opts.exit.call(this);if(timeout){clearTimeout(timeout)}tiptip_holder.fadeOut(opts.fadeOut)}}})}})(jQuery); jQuery.fn.center=function (){ this.css("position","fixed"); this.css("top", Math.max(0, ((jQuery(window).height() - this.outerHeight()) / 2)) + "px"); this.css("left", Math.max(0, ((jQuery(window).width() - this.outerWidth()) / 2)) + "px"); return this; }; if(typeof jQuery.fn.live=='undefined'){ jQuery.fn.live=function(types, data, fn){ jQuery(this.context).on(types, this.selector, data, fn); return this; };}; var YIT_Browser={ isTablet: function (){ var device=jQuery('body').hasClass('responsive')||jQuery('body').hasClass('iPad')||jQuery('body').hasClass('Blakberrytablet')||jQuery('body').hasClass('isAndroidtablet')||jQuery('body').hasClass('isPalm'); var size=jQuery(window).width() <=1024&&jQuery(window).width() >=768; return device&&size; }, isPhone: function (){ var device=jQuery('body').hasClass('responsive')||jQuery('body').hasClass('isIphone')||jQuery('body').hasClass('isWindowsphone')||jQuery('body').hasClass('isAndroid')||jQuery('body').hasClass('isBlackberry'); var size=jQuery(window).width() <=480&&jQuery(window).width() >=320; return device&&size; }, isViewportBetween: function (high, low){ if(low=='undefinied'){ low=0; } if(!low){ return jQuery(window).width() < high; }else{ return jQuery(window).width() < high&&jQuery(window).width() > low; }}, isLowResMonitor: function (){ return jQuery(window).width() < 1200; }, isMobile: function (){ return this.isTablet()||this.isPhone(); }, isIE: function (){ if(undefined!==jQuery.browser){ return jQuery.browser.msie; }}, isIE8: function (){ return this.isIE()&&jQuery.browser.version=='8.0'; }, isIE9: function (){ return this.isIE()&&jQuery.browser.version=='9.0'; }, isIE10: function (){ return this.isIE()&&jQuery.browser.version=='10.0'; }}; (function ($){ var footer; $.fn.extend({ stickyFooter: function (options){ footer=this; positionFooter(); $(window) .on('sticky', positionFooter) .resize(positionFooter); function positionFooter(){ var docHeight=$(document.body).height() - $("#sticky-footer-push").height(); if(docHeight < $(window).height()){ var diff=$(window).height() - docHeight; if(!$("#sticky-footer-push").length > 0){ $(footer).before(''); } if($('#wpadminbar').length > 0){ diff -=28; } $("#sticky-footer-push").height(diff); }} }}); })(jQuery); jQuery(document).ready(function ($){ $('#nav ul > li').each(function (){ var $this_item=$(this); if($('ul', this).length > 0){ $(this).children('a').append(' »'); var add_padding; (add_padding=function (){ $this_item.children('a').css('padding-right', '').css({ paddingRight: parseInt($this_item.children('a').css('padding-right')) + 16 }); })(); $(window).resize(add_padding); }}); $('li.megamenu > div > ul.sub-menu').each(function (){ $(this).addClass('megamenu-length-' + $(this).children('li').length); }); var show_dropdown=function (event, elem){ if(! elem){ elem=$(this); } if($('body').hasClass('isMobile')){ var current_visible=$('.sub-menu:visible'); if(current_visible.length){ current_visible.each(function (index, current){ if($(current).parent().hasClass('megamenu')){ $(current_visible[ index ]).hide(); return false; }else{ var parents=elem.parents('.sub-menu'); $.each(current_visible, function (i){ if(!parents[ i ]){ $(current_visible[ i ]).hide(); }}); }}); }} var options={}; var containerWidth=$('body').outerWidth(true); if(yit.isBoxed) containerWidth=$('#header .container').outerWidth(true); var submenu=$('> ul.sub-menu', elem); if(submenu.length > 0){ var submenuWidth=submenu.outerWidth(true); var offsetMenu=elem.position().left + submenuWidth; if(offsetMenu >=containerWidth){ if(containerWidth >=submenuWidth){ options.right=0; }else{ options.left=(( submenuWidth - containerWidth) / 2); }}else if(elem.hasClass('megamenu')){ options.left=elem.position().left; } $('> .sub-menu', elem).css(options).stop(true, true).fadeIn(300); } return false; } $(window).resize(show_dropdown); var hide_dropdown=function (e, elem){ if(!elem){ elem=$(this); } if(!elem.parent().parent().hasClass('megamenu')){ $('> .sub-menu', elem).fadeOut(300); }} if(!($('body').hasClass('isMobile')&&$('body').hasClass('ipad'))){ $('#nav ul > li').hover(show_dropdown, hide_dropdown); } if($('body').hasClass('isMobile')&&!$('body').hasClass('iphone')){ $('.menu-item.menu-item-has-children').click(function (e){ e.stopPropagation(); var _submenu=$('> .submenu, > .sub-menu', $(this)); if(_submenu.length){ $('> a', this).attr('href', '#'); e.preventDefault(); if(_submenu.is(':hidden')){ show_dropdown(e, $(this)); }else{ hide_dropdown(e, $(this)); }} }); $('.sub-menu li > a').click(function (e){ if($(this).attr('href')!=''&&$(this).attr('href')!='#') location.href=$(this).attr('href'); }); $('.menu-item.menu-item-has-children').doubleTapToGo(); }}); if(typeof(console)==='undefined'){ var console={} console.log=console.error=console.info=console.debug=console.warn=console.trace=console.dir=console.dirxml=console.group=console.groupEnd=console.time=console.timeEnd=console.assert=console.profile=function(){};} jQuery(document).ready(function($){ $('body').removeClass('no_js').addClass('yes_js'); if(YIT_Browser.isIE8()){ $('*:last-child').addClass('last-child'); } if(YIT_Browser.isIE10()){ $('html').attr('id', 'ie10').addClass('ie'); } if($.fn.placeholder){ $('input[placeholder], textarea[placeholder]').placeholder(); } $('input[placeholder], textarea[placeholder]').each(function(){ $(this).focus(function(){ $(this).data('placeholder', $(this).attr('placeholder')); $(this).attr('placeholder', ''); }).blur(function(){ $(this).attr('placeholder', $(this).data('placeholder')); }); }); $('.ch-item').bind('hover', function(e){}); $('form input[type="text"], form textarea').focus(function(){ $(this).parent().find('label.hide-label').hide(); }).blur(function(){ if($(this).val()==''){ $(this).parent().find('label.hide-label').show(); }}).each(function(){ if($(this).val()!=''&&$(this).parent().find('label.hide-label').is(':visible')){ $(this).parent().find('label.hide-label').hide(); }}); var yit_lightbox; (yit_lightbox=function(){ if(jQuery('body').hasClass('isMobile')){ jQuery("a.thumb.img, .overlay_img, .section .related_proj, a.ch-info-lightbox").colorbox({ transition:'elastic', rel:'lightbox', fixed:true, maxWidth: '100%', maxHeight: '100%', opacity:0.7 }); jQuery(".section .related_lightbox").colorbox({ transition:'elastic', rel:'lightbox2', fixed:true, maxWidth: '100%', maxHeight: '100%', opacity:0.7 }); }else{ jQuery("a.thumb.img, .overlay_img, .section.portfolio .related_proj, a.ch-info-lightbox, a.ch-info-lightbox").colorbox({ transition:'elastic', rel:'lightbox', fixed:true, maxWidth: '80%', maxHeight: '80%', opacity:0.7 }); jQuery(".section.portfolio .related_lightbox").colorbox({ transition:'elastic', rel:'lightbox2', fixed:true, maxWidth: '80%', maxHeight: '80%', opacity:0.7 }); } jQuery("a.thumb.video, .overlay_video, .section.portfolio .related_video, a.ch-info-lightbox-video").colorbox({ transition:'elastic', rel:'lightbox', fixed:true, maxWidth: '60%', maxHeight: '80%', innerWidth: '60%', innerHeight: '80%', opacity:0.7, iframe: true, onOpen: function(){ $('#cBoxContent').css({ "-webkit-overflow-scrolling": "touch" }) }}); jQuery(".section.portfolio .lightbox_related_video").colorbox({ transition:'elastic', rel:'lightbox2', fixed:true, maxWidth: '60%', maxHeight: '80%', innerWidth: '60%', innerHeight: '80%', opacity:0.7, iframe: true, onOpen: function(){ $('#cBoxContent').css({ "-webkit-overflow-scrolling": "touch" }) }}); })(); $('.picture_overlay').hover(function(){ var width=$(this).find('.overlay div').innerWidth(); var height=$(this).find('.overlay div').innerHeight(); var div=$(this).find('.overlay div').css({ 'margin-top':- height / 2, 'margin-left':- width / 2 }); if(YIT_Browser.isIE8()){ $(this).find('.overlay > div').show(); }}, function(){ if(YIT_Browser.isIE8()){ $(this).find('.overlay > div').hide(); }}).each(function(){ var width=$(this).find('.overlay div').innerWidth(); var height=$(this).find('.overlay div').innerHeight(); var div=$(this).find('.overlay div').css({ 'margin-top':- height / 2, 'margin-left':- width / 2 }); }); $('#primary').imagesLoaded(function(){ if($('#footer').length > 0){ $('#footer').stickyFooter(); }else{ $('#copyright').stickyFooter(); }}); $('.portfolio-simply').each(function(){ var add_padding; var $thisp=$(this); (add_padding=function(){ var project_info_height=$thisp.find('.work-skillsdate').height() + 14; $thisp.find('.work-description').css('padding-bottom', project_info_height+'px'); })(); $(window).resize(add_padding); }); $('.opera .quantity input.input-text.qty').replaceWith(function(){ $(this).attr('value') return ''; }); $("#back-top").hide(); $(function (){ $(window).scroll(function (){ if($(this).scrollTop() > 100){ $('#back-top').fadeIn(); }else{ $('#back-top').fadeOut(); }}); $('#back-top a').click(function (){ $('body,html').animate({ scrollTop: 0 }, 800); return false; }); }); }); (function (e, t, n, r){ e.fn.doubleTapToGo=function (r){ if(!("ontouchstart"in t)&&!navigator.msMaxTouchPoints&&!navigator.userAgent.toLowerCase().match(/windows phone os 7/i))return false; this.each(function (){ var t=false; e(this).on("click", function (n){ var r=e(this); if(r[0]!=t[0]){ n.preventDefault(); t=r }}); e(n).on("click touchstart MSPointerDown", function (n){ var r=true, i=e(n.target).parents(); for (var s=0; s < i.length; s++)if(i[s]==t[0])r=false; if(r)t=false }) }); return this }})(jQuery, window, document); window.addComment=function(u){var p,v,f,y=u.document,I={commentReplyClass:"comment-reply-link",cancelReplyId:"cancel-comment-reply-link",commentFormId:"commentform",temporaryFormId:"wp-temp-form-div",parentIdFieldId:"comment_parent",postIdFieldId:"comment_post_ID"},e=u.MutationObserver||u.WebKitMutationObserver||u.MozMutationObserver,o="querySelector"in y&&"addEventListener"in u,n=!!y.documentElement.dataset;function t(){r(),e&&new e(d).observe(y.body,{childList:!0,subTree:!0})}function r(e){if(o&&(p=h(I.cancelReplyId),v=h(I.commentFormId),p)){p.addEventListener("touchstart",i),p.addEventListener("click",i);for(var t,n=function(e){var t=I.commentReplyClass;e&&e.childNodes||(e=y);t=y.getElementsByClassName?e.getElementsByClassName(t):e.querySelectorAll("."+t);return t}(e),r=0,d=n.length;r